﻿<cfsilent>
	<cfscript>
		
		dictAdvice = getProperty("serviceFactory").getBean("senateDictionaryAdvice");
		datetimeAdvice = getProperty("serviceFactory").getBean("datetimeAdvice");
		
		event.setArg("pageTitle", "教学运行基础数据 - 学生学籍管理 - 校内学生转专业");
		
		termId = event.getArg("TermID");

		academicYear = event.getArg("AcademicYear");
		academicTerm = event.getArg("AcademicTerm");
		
		termDateStart = event.getArg("DateStart");
		
		/* 转专业申请限制条件 */
		signDateStart = event.getArg("SBJCHG.DateStart");
		signDateEnd = event.getArg("SBJCHG.DateEnd");
		gpaReq = event.getArg("SBJCHG.CreditPointAvgRequired");
		gpa = event.getArg("SBJCHG.CreditPointAvg");

		if ( signDateStart eq "" ) {
			signDateStart = dateFormat( now(), "YYYYMMDD" );
		}
		if ( signDateEnd eq "" ) {
			signDateEnd = dateFormat( dateAdd( "D", 14, now() ), "YYYYMMDD" );
		}
		if ( gpaReq eq "" ) {
			gpaReq = "0.00";
		}
		if ( gpa eq "" ) {
			gpa = "0.00";
		}
		
		
		currentTab = event.getArg("TabID", "labCondition");
		
	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('studentProfile')#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">学籍档案</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 application"></i>校内学生申请转专业
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labCondition">class="active"</cfif> id="labCondition" tabTarget="Condition">专业条件设置</span>
						<span <cfif currentTab eq "labSummary">class="active"</cfif> id="labSummary" tabTarget="Summary">志愿填报一览</span>
						<span <cfif currentTab eq "labWaiting">class="active"</cfif> id="labWaiting" tabTarget="Waiting">待审批</span>
						<span <cfif currentTab eq "labHistory">class="active"</cfif> id="labHistory" tabTarget="History">历史记录</span>
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>
				</script>

				<div id="Condition" class="tabContent">
					
					<div class="noticeBlock">
						<h3>在校学生转专业限制条件</h3>
						<hr/>
					</div>
					
					<form id="formEdit" onSubmit="javascript:return processVerfiyForm('formEdit');" class="formWrapper" method="post" action="<cfoutput>#buildURL('studentSubjectChangeConditionSaveDo')#</cfoutput>">
						
						<div class="label">
							<span class="req">*</span><b>报名时间段</b>
							
							<input name="DateStart" id="DateStart" type="text" class="typeDate" verification="date" maxlength="10" value="<cfoutput>#datetimeAdvice.formatDateString( signDateStart )#</cfoutput>" /><span id="startTrigger" class="btnCalendar"></span>
							&nbsp;&nbsp;
							至
							&nbsp;&nbsp;
							<input name="DateEnd" id="DateEnd" type="text" class="typeDate" verification="date" maxlength="10" value="<cfoutput>#datetimeAdvice.formatDateString( signDateEnd )#</cfoutput>" /><span id="endTrigger" class="btnCalendar"></span>
							
							<p class="notice">
								允许学生进行网上转专业申请填报的时间段, 建议该时间段安排于当前学期选课之前, 在学生网上选课进行之前必须完成所有的学生专业变更.
							</p>
							
						</div>
						
						<div class="label">
							<span class="req">*</span><b>平均绩点要求</b>
							必修课 
							<input name="CreditPointAvgRequired" id="CreditPointAvgRequired" type="text" class="typeTinyInt" verification="double" maxlength="4" value="<cfoutput>#gpaReq#</cfoutput>" />
							&nbsp;&nbsp;
							所有课程 
							<input name="CreditPointAvg" id="CreditPointAvg" type="text" class="typeTinyInt" verification="double" maxlength="4" value="<cfoutput>#gpa#</cfoutput>" />
						</div>

						<div class="lable">
							<input class="button" type="submit" value="保存" />
							<input id="formReset" class="button1" type="reset" value="重设表格" />
						</div>
						
					</form>
					<script language="javascript" type="text/javascript">
						//<![CDATA[
						<!--
						$(document).ready(function() {
							
							$("#DateStart").mask("9999-99-99");
							$("#DateEnd").mask("9999-99-99");
							
							Calendar.setup({
									trigger    : "startTrigger",
									inputField : "DateStart",
									animation  : false
									});
								
							Calendar.setup({
									trigger    : "endTrigger",
									inputField : "DateEnd",
									animation  : false
									});

						});
						// -->
						//]]>
					</script>
					
				</div>
				
				<div id="Summary" class="tabContent">
					
					<div class="noticeBlock">
						<h3><cfoutput>#academicYear#</cfoutput> 学年 <cfoutput>#dictAdvice.getTerm( academicTerm )#</cfoutput> 转专业志愿填报情况</h3>
						<hr/>
					</div>
					
					
				</div>
				
				<div id="Waiting" class="tabContent">
					
					<div class="noticeBlock">
						<h3>转专业学生申请</h3>
						<hr/>
					</div>
					
					
				</div>
				
				<div id="History" class="tabContent">
					
					<div class="noticeBlock">
						<h3>历史记录</h3>
						<hr/>
					</div>
					
				</div>
				
			</div>
		</li>
	</ul>
</div>